home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / cbm / 4633 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.9 KB  |  39 lines

  1. Newsgroups: comp.sys.cbm
  2. Path: novice.uwaterloo.ca!dfevans
  3. From: dfevans@bbcr.uwaterloo.ca (David Evans)
  4. Subject: Re: calling BASIC from ML
  5. Sender: news@novice.uwaterloo.ca (Mr. News)
  6. Message-ID: <DowuHL.ECs@novice.uwaterloo.ca>
  7. Date: Wed, 27 Mar 1996 05:12:56 GMT
  8. References: <4jabc4$3oc@daily-planet.execpc.com>
  9. Nntp-Posting-Host: bcr.uwaterloo.ca
  10. Organization: University of Waterloo
  11.  
  12. In article <4jabc4$3oc@daily-planet.execpc.com>,  <ulthar@execpc.com> wrote:
  13. >I am writing a menu program for use with my CMD hard drive.  It's written in Power C using
  14. >Rubens Abboud's windowing routines (with my mouse driver), and a machine language function
  15. >which, given the menu number as a parameter, loads and runs the specified choice.  That may
  16. >sound kind of screwy, but it successfully loads and runs Dickenson's StereoPlayer, GEOS, and
  17. >the Power C shell.
  18. >
  19. >Now for the hard part.  I want Novaterm on that menu, but since its loader is written in BASIC,
  20. >I don't know how to pass control to it.  Can anyone tell me how to run a BASIC program from
  21. >machine language?  I had to call IOINIT, CINT, and RESTOR to pry the Power C shell's icy fingers
  22. >from the machine.
  23. >
  24.  
  25.   My favourite cheesy approach to this is dynamic keyboarding.  Print the LOAD
  26. commands to the screen (in the same colour as the background, if you like) with
  27. the proper spacing for the prompts.  Then stick a home and the correct number
  28. of returns in the keyboard buffer, set the number of characters in the buffer
  29. to match, and then return to direct mode.  This method is rather hoaky, but it
  30. gets the job done.
  31.   I suppose you could use LOAD and then JMP to BASIC's run entry, but I've
  32. never tried this.
  33.  
  34. -- 
  35. David Evans              (NeXTMail OK)              dfevans@bbcr.uwaterloo.ca
  36. Computer/Synth Junkie                      http://bbcr.uwaterloo.ca/~dfevans/
  37. University of Waterloo         "Default is the value selected by the composer
  38. Ontario, Canada           overridden by your command." - Roland TR-707 Manual
  39.